package com.study.juc;

import java.util.concurrent.atomic.AtomicInteger;

public class VolatileDemo {
    volatile int age = 0;

    public static void main(String[] args) {
        VolatileDemo volatileDemo = new VolatileDemo();
        volatileDemo.age++;
        System.out.println("age = " + volatileDemo.age);
    }
}
